Below is my Update trigger code.

<<CREATE TRIGGER dbo.tu_prproject
ON dbo.PRProject
FOR UPDATE AS

update costtrack_test..prproject
set prID = inserted.prID,
prName = inserted.prName,
prDepartment = inserted.prDepartment

from prproject, deleted, inserted

where prproject.prID = deleted.prID>>

OBJECTIVE:
I&#39;m testing the above update trigger with confusing results. When I do a simple update to the prproject table in the abttest database, I want the same update done to the prproject table in the costtrack_test database.

PROBLEM:

BEFORE (prproject table in the Costtrack_Test database):

prID prName prDepartment
9001 Junk1 junk1
9002 Junk2 junk2
9003 Junk3 junk3
9004 Junk4 junk4
9005 Junk5 junk5
9006 Junk6 junk6
9007 Junk7 junk7
9008 junk8 junk8
9009 Junk9 junk9
9010 Junk10 junk10

(This update statement is performed successfully on the prproject table, in the ABTTEST database)
Update prproject
Set prName = &#39;Updating Command Junk5&#39;
Where prID = 9005

AFTER (prproject table in the Costtrack_Test database):

prID prName prDepartment
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5
9005 Update Command Junk5 Junk5


If you have time, please take a look at my Update trigger code. Thank you.

Mark Vadnais